package leetcode.offer022;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;
import leetcode.helper.tree.ListNode;

public abstract class Offer022 implements IDebug {
	public abstract ListNode getKthFromEnd(ListNode head, int k);

	@Override
	public void debug1() {
		String input = "[1,2,3,4,5]";
		int k = 2;
		String output = "[4,5]";
		int[] array1 = HelpDebug.str2array3(input);
		int[] array2 = HelpDebug.str2array3(output);
		ListNode head = new ListNode().setArray(array1);
		ListNode expect = new ListNode().setArray(array2);
		ListNode result = this.getKthFromEnd(head, k);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug2() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
